<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link rel="stylesheet" href="__PUBLIC__/assets/css/jquery-ui.css" />
</block>
<block name="stylecss">
<style type='text/css'>
	.pages a,.pages span {
	    display:inline-block;
	    padding:5px 9px;
	    margin:0 1px;
	    border:1px solid #f0f0f0;
	}
	.pages a,.pages li {
	    display:inline-block;
	    list-style: none;
	    text-decoration:none; color:#58A0D3;
	}
	.pages a.first,.pages a.prev,.pages a.next,.pages a.end{
	    margin:0;
	}
	.pages a:hover{
	    border-color:#50A8E6;
	}
	.pages span.current{
	    background:#50A8E6;
	    color:#FFF;
	    font-weight:700;
	    border-color:#50A8E6;
	}
	.table input,select{
		border-radius:6px !important;
	}
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>

	<li class="active">线上考试跟踪</li>
</ul><!-- /.breadcrumb -->
</block>

<block name="content">
	<div class="accordion" id="accordion2" style="border:1px solid #cccccc;padding:10px;border-radius:8px;margin-bottom:10px">
		<div class="accordion-group">
			<div class="accordion-heading">
				<a class="accordion-toggle collapsed" style="font-size:14px;" data-toggle="collapse" data-parent="#accordion2" href="#collapseSelect"> 请选择查询条件 </a>
			</div>
				<div id="collapseSelect" class="accordion-body collapse" style="height: 0px;padding-top:10px">
					<div class="accordion-inner">
						<form action="" id="form" name="selectUserForm" method="get">
							<input type="hidden" name="p" value="1">
							<table class="table" style="margin:0">
								<tr>
									<td>Midi ID： <input name="user_id" type="text" /></td>
									<td>昵称： <input name="user_name" type="text" /></td>
									<td>手机号码： <input name="user_phone" type="text" /></td>
									<td><button class="btn btn-sm btn-success" type="submit">查询</button></td>
								</tr>
							</table>

						</form>
					</div>
				</div>
		</div>
	</div>

	<input type="hidden" id="crontab-s" />

	<table id="sample-table-1" class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th class="center">编号</th>
			    <th class="center">Midi ID</th>
				<th class="center">姓名</th>
				<th class="center">手机号码</th>
				<th class="center">专业</th>
				<th class="center">等级</th>
				<th class="center"><i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>考试时间</th>
				<th class="center">考试状态</th>
				<th class="center">考试结果</th>
				<th class="center">操作</th>
			</tr>
		</thead>

		<tbody>
			<foreach name="exam_arr" item="v">
			<tr style="text-align:center">
				<td>{$key+1}</td>
				<td class="center">{$v.exam_user_id|formatNO=6}</td>
				<td>{$v.user_name}</td>
				<td>{$v.user_phone}</td>
				<td>
					<?php if ($v['exam_major_id'] == 1): ?>
					电吉他
					<?php elseif ($v['exam_major_id'] == 2): ?>
					爵士鼓
					<?php elseif ($v['exam_major_id'] == 3): ?>
					电贝司
					<?php endif ?>
				</td>
				<td>{$v.exam_level}级</td>
				<td>{$v.exam_ymd}&nbsp;{$v.examtime_time}</td>
				<td>
					<?php if ($v['exam_status'] == 1): ?>
					<span style="color:blue">报名成功</span>
					<?php elseif ($v['exam_status'] == 3): ?>
					<span style="color:green">完成考试</span>
					<?php endif ?>
				</td>
				<td>
					<?php if ($v['exam_result'] == 1): ?>
					<span style="color:orange">等待考试结果</span>
					<?php elseif ($v['exam_result'] == 2): ?>
					<span style="color:green">考试通过</span>
					<?php elseif ($v['exam_result'] == 3): ?>
					<span style="color:red">考试未通过</span>
					<?php elseif ($v['exam_result'] == 4): ?>
					<span style="color:blue">考试过期</span>
					<?php endif ?>
				</td>
				<td>
					<div class="hidden-sm hidden-xs btn-group">
						<div class="hidden-sm hidden-xs action-buttons">

							<a class="blue" style='cursor:pointer' title='查看考试信息'onClick='location.href="__CONTROLLER__/online_details/exam_id/{$v.exam_id}"'>
								<i class="ace-icon fa fa-search-plus bigger-130"></i>
							</a>

							<a class="red" style='cursor:pointer' onClick='dialog_see({$v.exam_id})' title='删除考试'>
								<i class="ace-icon fa fa-trash-o bigger-130"></i>
							</a>
						</div>
					</div>
				</td>
			</tr>
		    </foreach>
		</tbody>
	</table>
<div class="pages" style="float:right">{$page}</div>
<!-- 删除大师模态框（Modal） -->
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" data-backdrop="static">
   <div class="modal-dialog modal-sm">
	  <div class="modal-content">
		 <div class="modal-header">
			<button type="button" class="close" aria-hidden="true" onClick='modal_close()'>×</button>
			<h4 class="modal-title" id="myModalLabel">删除考试</h4>
		 </div>
		 <div class="modal-body" style='padding-bottom:0px'>
            <div class="row" style='margin-bottom:15px;margin-left:2px;font-size:14px'>
                确认是否删除该考试？
            </div>
		 </div>
		 <div class="modal-footer">
		 	<button data-bb-handler="button" type="button" class="btn btn-sm" onClick='modal_close()'>取消</button>
		 	<button type="button" class="btn btn-sm btn-primary" onClick='type_submit()'>确定</button>
		 </div>
	  </div><!-- /.modal-content -->
   </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</block>
<block name="scripts"></block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_exam').addClass('active open');
        $('#menu_examonline_list').addClass('active');
    });
</script>
<script script="text/javascript">
    //模态框查看信息
    function dialog_see(obj) {
    	$('#crontab-s').val(obj);
		$('#myModal').modal('show');
	}

	//模态框关闭
	function modal_close() {
		$('#myModal').modal('hide');
	}

	//删除分类
    function type_delete(obj) {
    	$('#myModal').modal('show');
    }

    //删除提交
    function type_submit() {
    	var crontab = $('#crontab-s').val();
    	$('#myModal').modal('hide');
    	location.href="__CONTROLLER__/examonline_del/exam_id/"+crontab;
    }
</script>
</block>